package com.afterglow.example.provider;

import com.afterglow.example.common.service.UserService;
import com.afterglow.lcsrpc.RpcApplication;
import com.afterglow.lcsrpc.registry.LocalRegistry;
import com.afterglow.lcsrpc.server.HttpServer;
import com.afterglow.lcsrpc.server.VertxHttpServer;

/**
 * Description: 建议服务提供者示例
 * Date: 2024/12/08
 * author: lcs
 */
public class EasyProviderExample {

    public static void main(String[] args) {

        // RPC框架初始化
        RpcApplication.init();

        //注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);

        //启动web服务
        HttpServer httpServer = new VertxHttpServer();
        httpServer.doStart(8080);
    }
}
